﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using webapp4U.DAL;

/// <summary>
/// Summary description for InClassCategory
/// </summary>
namespace webapp4U.BOL
{
    public class InClassCategory
    {
        #region Member Variables

        private String _inclasskey;

        private String _description;

        private String _commodDescription;
        
        #endregion

        #region Public Properties
        public String InClassKey
        {
            get { return _inclasskey; }
            set { _inclasskey = value; }
        }
        
        public String Description
        {
            get { return _description; }
            set { _description = value; }
        }

        public String CommodDescription
        {
            get { return _commodDescription; }
            set { _commodDescription = value; }
        }
        #endregion

        #region public static Methods

        //Get All Category
        public static List<InClassCategory> GetAllCategory(int PageIndex, int PageSize, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetAllCategory(PageIndex, PageSize, ref error);
        }
        public static List<InClassCategory> GetAllCategoryCommodNotInClass(int PageIndex, int PageSize, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetAllCategoryCommodNotInClass(PageIndex, PageSize, ref error);
        }
       
        public static List<InClassCategory> GetAllCategoryByCommodKey(string CommodKey, int PageIndex, int PageSize, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetAllCategoryByCommodKye(CommodKey, PageIndex, PageSize, ref error);
        }

        // Get Count All records of Table  Category
        public static int GetCountCategory(ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetCountCategory(ref error);
        }
        public static int GetCountCategoryCommodNotInClass(ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetCountCategoryCommodNotInClass(ref error);
        }
        
        public static int GetCountCategoryByCommodKey(string CommodKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetCountCategoryByCommoKey(CommodKey,ref error);
        }

        public static string GetNameCategoryByInClassKey(string InClassKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetNameCategoryByInClassKey(InClassKey, ref error);
        }
        public static string GetCommodNameCategoryByInClassKey(string InClassKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetCommodNameCategoryCommodByInClasss(InClassKey, ref error);
        }

        public static string GetCommodNameCategoryByItemKey(string ItemKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetCommodNameCategoryCommodByItemKey(ItemKey, ref error);
        }
        public static string GetNameCategoryByItemKey(string ItemKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetInClassNameCategoryCommodByItemKey(ItemKey, ref error);
        }

        public static string GetNameCategoryByCommodKey(string CommodKey, ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetNameCategoryByCommodKey(CommodKey, ref error);
        }

        public static List<InClassCategory> GetInClassCategoryNoPageSize(ref string error)
        {
            InClassCategoryDAL db = new InClassCategoryDAL();
            return db.GetInClassCategoryNoPageSize(ref error);
        }
        #endregion
    }
}